unit UnitRelMensalPosto;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UnitRelDiaDia, RLPDFFilter, RLParser, RLFilters, RLXLSFilter,
  DB, ADODB, RLReport, StrUtils;

type
  TRelMensalPosto = class(TRelDiarioPosto)
    qryConsultaMES: TIntegerField;
    qryConsultaANO: TIntegerField;
    qryConsultaMESANO: TStringField;
    procedure qryConsultaCalcFields(DataSet: TDataSet);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    Mes : Array[1..12] of String[3];
    { Private declarations }
  public
    { Public declarations }
  end;

var
  RelMensalPosto: TRelMensalPosto;

implementation

uses UnitPrincipal;

{$R *.dfm}

procedure TRelMensalPosto.qryConsultaCalcFields(DataSet: TDataSet);
begin
  inherited;
  qryConsultaMESANO.AsString := MES[qryConsultaMES.Value]+RightStr(qryConsultaANO.AsString,2);
end;

procedure TRelMensalPosto.FormCreate(Sender: TObject);
begin
  inherited;
  Mes[1] := 'JAN';
  Mes[2] := 'FEV';
  Mes[3] := 'MAR';
  Mes[4] := 'ABR';
  Mes[5] := 'MAI';
  Mes[6] := 'JUN';
  Mes[7] := 'JUL';
  Mes[8] := 'AGO';
  Mes[9] := 'SET';
  Mes[10] := 'OUT';
  Mes[11] := 'NOV';
  Mes[12] := 'DEZ';
end;

procedure TRelMensalPosto.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  RelMensalPosto := nil;
end;

end.
